/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package amor_boutique_management;

/**
 *
 * @author LovingXu
 */
public class AmorBoutiqueManagementFrame extends javax.swing.JFrame {

    /**
     * Creates new form Amor_Boutique_Management_Frame
     */
    public AmorBoutiqueManagementFrame() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnTop = new javax.swing.JPanel();
        btPurchase = new javax.swing.JButton();
        btInventory = new javax.swing.JButton();
        btAccounting = new javax.swing.JButton();
        pnCenter = new javax.swing.JPanel();
        lblBanner = new javax.swing.JLabel();
        pnBottom = new javax.swing.JPanel();
        mnBar = new javax.swing.JMenuBar();
        mnManage = new javax.swing.JMenu();
        mnBranch = new javax.swing.JMenuItem();
        mnType = new javax.swing.JMenuItem();
        mnHelp = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Phần mềm quản lý Amor Boutique");
        setName("mainFrame");
        setResizable(false);

        pnTop.setLayout(new java.awt.GridLayout(1, 0));

        btPurchase.setText("Bán hàng");
        pnTop.add(btPurchase);

        btInventory.setText("Kho");
        btInventory.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btInventoryActionPerformed(evt);
            }
        });
        pnTop.add(btInventory);

        btAccounting.setText("Kế toán");
        btAccounting.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAccountingActionPerformed(evt);
            }
        });
        pnTop.add(btAccounting);

        lblBanner.setIcon(new javax.swing.ImageIcon(getClass().getResource("/amor_boutique_management/resources/amor_background.gif"))); // NOI18N

        javax.swing.GroupLayout pnCenterLayout = new javax.swing.GroupLayout(pnCenter);
        pnCenter.setLayout(pnCenterLayout);
        pnCenterLayout.setHorizontalGroup(
            pnCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblBanner)
        );
        pnCenterLayout.setVerticalGroup(
            pnCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnCenterLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(lblBanner, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout pnBottomLayout = new javax.swing.GroupLayout(pnBottom);
        pnBottom.setLayout(pnBottomLayout);
        pnBottomLayout.setHorizontalGroup(
            pnBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        pnBottomLayout.setVerticalGroup(
            pnBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 32, Short.MAX_VALUE)
        );

        mnManage.setText("Quản lý");

        mnBranch.setText("Nhãn hiệu");
        mnBranch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnBranchActionPerformed(evt);
            }
        });
        mnManage.add(mnBranch);

        mnType.setText("Loại");
        mnType.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnTypeActionPerformed(evt);
            }
        });
        mnManage.add(mnType);

        mnBar.add(mnManage);

        mnHelp.setText("Trợ giúp");
        mnBar.add(mnHelp);

        setJMenuBar(mnBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnTop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pnCenter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pnBottom, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnTop, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnCenter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnBottom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btInventoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btInventoryActionPerformed
        InventoryFrame frInventory = new InventoryFrame();
        frInventory.setLocationRelativeTo(this);
        frInventory.setVisible(true);
    }//GEN-LAST:event_btInventoryActionPerformed

    private void btAccountingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAccountingActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btAccountingActionPerformed

    private void mnBranchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnBranchActionPerformed
        BranchFrame fBranch = new BranchFrame();
        fBranch.setLocationRelativeTo(this);
        fBranch.setVisible(true);
    }//GEN-LAST:event_mnBranchActionPerformed

    private void mnTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnTypeActionPerformed
        TypeFrame fType = new TypeFrame();
        fType.setLocationRelativeTo(this);
        fType.setVisible(true);
    }//GEN-LAST:event_mnTypeActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(AmorBoutiqueManagementFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(AmorBoutiqueManagementFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(AmorBoutiqueManagementFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AmorBoutiqueManagementFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new AmorBoutiqueManagementFrame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btAccounting;
    private javax.swing.JButton btInventory;
    private javax.swing.JButton btPurchase;
    private javax.swing.JLabel lblBanner;
    private javax.swing.JMenuBar mnBar;
    private javax.swing.JMenuItem mnBranch;
    private javax.swing.JMenu mnHelp;
    private javax.swing.JMenu mnManage;
    private javax.swing.JMenuItem mnType;
    private javax.swing.JPanel pnBottom;
    private javax.swing.JPanel pnCenter;
    private javax.swing.JPanel pnTop;
    // End of variables declaration//GEN-END:variables
}
